package com.bruce.shop.service.impl;

import com.bruce.shop.dao.BaseDao;
import com.bruce.shop.dao.ProductTypeDao;
import com.bruce.shop.dao.impl.ProductTypeDaoImpl;
import com.bruce.shop.entity.Page;
import com.bruce.shop.entity.ProductType;
import com.bruce.shop.service.ProductTypeService;

import java.util.List;

/**
 * @author BruceXia
 * @version 1.0.0
 * @description:业务层商品类型接口的实现类，需要继承抽取出来的BaseServiceImpl还要实现自己的接口
 * @date 2022/9/1823:22
 */
public class ProductTypeServiceImpl extends BaseServiceImpl<ProductType> implements ProductTypeService {

    /**
     * 实例化一个Dao层对象
     */
    private ProductTypeDao productTypeDao = new ProductTypeDaoImpl();

    @Override
    public List<ProductType> getProductListByPid(int pid) {
        return productTypeDao.getProductListByPid(pid);
    }

    @Override
    protected BaseDao<ProductType> getBaseDao() {
        return productTypeDao;
    }
}
